export const table_config = () => {
    const config = {
        pageSize: 10,
        pageNum: 1,
        total: 1000,
        rowKey: "roleId", //如果需要树型数据填写这个，否则为空
        defaultColumnWidth: null,//默认的列宽

        //UI
        defaultExpandAll: false, //是否默认展开所有行
        pagingShow: true,//本页1-2
        totalShow: true,//共10条数据
        paginationShow: true,//分页

        selectionChange:true, //是否支持多选
        searchList: [
            {placeholder: '请输入姓名', label: '姓名', key: 'roleName', type: 'text'},
            {placeholder: '请输入身份证号', label: '身份证号', key: 'roleName', type: 'text'},
            {placeholder: '请输入手机号', label: '手机号', key: 'roleName', type: 'text'},
            // {placeholder: '请输入角色名称', label: '角色名称', key: 'roleName', type: 'text'},
            // {
            //     placeholder: '状态',
            //     label: '状态',
            //     key: 'status',
            //     type: 'select',
            //     source: "dict", //source: dict字典查询/select 数据来源方向
            //     dict: "sys_normal_disable",
            // },
        ],
        buttonList: [
            {name: '刷新数据', type: 'primary', plain: true, emitLabel: 'refresh'},
            // {name: '新增任职', type: 'primary', emitLabel: 'add',power:"system:dept:add"},
            // {name: '删除用户', type: 'danger', emitLabel: 'delAll',power:"system:dept:remove"},
        ],
        tableList: [
            {label: '职务', key: 'postIdsValue'},
            // {label: '用户编号', key: 'userId'},
            // {label: '用户名', key: 'userName'},
            {label: '级别', key: 'nickName'},
            {label: '姓名', key: 'nickName'},
            {label: '状态', key: 'nickName'},
            {label: '任职时间', key: 'nickName'},
            {label: '免职时间', key: 'nickName'},
            {label: '现职时间', key: 'nickName'},
            {label: '本级时间', key: 'nickName'},
            {label: '下级时间', key: 'nickName'},
            // {label: '性别', key: 'sex',dicKey: "sys_user_sex"},
            // {label: '联系电话', key: 'phonenumber'},
            // {label: '政治面貌', key: 'politicalOutlook',dicKey: "political_outlook"},
            // {label: '电子邮件', key: 'email'},
            // {label: '最高学历', key: 'highestEducational',dicKey: "highest_educational"},
            // {label: '最高学历专业', key: 'highestMajor',dicKey: "highest_major"},
            // {label: '用户部门', key: 'dept',childKey:"deptName"},
            // {label: '状态', key: 'status', dicKey: "sys_normal_disable"},
            // {label: '创建时间', key: 'createTime'}
        ],
        tableButton: {
            name: '操作',
            width:180,
            list: [
                // {name: '修改', type: 'success', emitLabel: 'edit',power:"system:dept:edit"},
                // {name: '重置密码', type: 'danger', emitLabel: 'reset',power:"system:dept:resetPwd"}
                {name: '任职', type: 'success', emitLabel: 'edit',power:"system:dept:edit"},
                {name: '免职', type: 'danger', emitLabel: 'reset',power:"system:dept:resetPwd"}
            ]
        }
    }
    return config
}